//-------------------------------------------------------------------
//	Copyright (c) 2012-2014 Zhirnov Andrey
//	This file is part of the "UXGEN-ES" project.
//	See copyright notice in "Engine.h".
//-------------------------------------------------------------------

#pragma once

#include "UI/Types/Types.h"

namespace Engine
{
namespace UI
{

	//
	// Frame Animation interface
	//

	class IFrameAnimation : public BaseObject
	{
	// types
	public:
		typedef array< FramePtr >	frame_stack_t;
		
		typedef delegate< void () >	OnAnimFinishedCallback_t;


	// methods
	protected:
		IFrameAnimation (const EngineSubSystemsRef ess) : BaseObject(ess)
		{}

		
	// interface
	public:
		// setup
		virtual void SetDuration (float duration) = 0;


		// called from Screen
		virtual void Start (const FramePtr &animatedFrame, const OnAnimFinishedCallback_t &cb) = 0;
		virtual void Stop () = 0;

		virtual void Draw (uint firstFrame, const frame_stack_t &frames, float timeDelta) = 0;
		//virtual bool IsFinished () = 0;
	};


}	// UI
}	// Engine
